home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-05-03 | 723 b | 28 lines | [TEXT/ToyS] |
- on PrintObjects(cont, objs)
- tell application "Finder" to print cont items objs
- end PrintObjects
-
- on container(i)
- set s to i as string
- set oldDelimiters to AppleScript's text item delimiters
- set AppleScript's text item delimiters to {":"}
- set n to number of text items in s
- set res to text item 1 of s
- repeat with counter from 2 to n - 1
- set res to res & ":" & (text item counter of s)
- end repeat
- set AppleScript's text item delimiters to oldDelimiters
- return ((res & ":") as string)
- end container
-
- on PrintFile(i)
- PrintObjects(alias container(i), {i})
- end PrintFile
-
- on open f
- set f to f as list
- set printer to "ImageWriter" using printer port
- repeat with i in f
- PrintFile(i as alias)
- end repeat
- end open